package com.woniu.zsd.user.service;

import com.woniu.zsd.user.entity.Address;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.zsd.user.param.AddAddressParam;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yjf
 * @since 2025年02月22日
 */
public interface AddressService extends IService<Address> {

    List<Address> selectAddressByUserId(Integer userId);

    /**
     * Adds a new address for a specific user based on the provided address details.
     * This method takes an {@link AddAddressParam} object as input, which contains all the necessary
     * information to create and store a new address entry in the system.
     *
     * @param param The {@link AddAddressParam} object containing the address details. This includes:
     *              - userId: The unique identifier of the user for whom the address is being added.
     *              - address: The full address string.
     *              - city: The city part of the address.
     *              - district: The district or locality within the city.
     *              - street: The street name or number.
     *              - detail: Additional details or landmarks for the address.
     *              - lat: The latitude coordinate of the address location.
     *              - lng: The longitude coordinate of the address location.
     *              The method does not return any value but ensures the address is persisted in the system.
     */
    void addAddress(AddAddressParam param);
}
